package com.yb0os1.decorator.inputstream;

import java.io.FileInputStream;
import java.io.IOException;

public class RecordReadInputStream extends BufferInputStream {
    private int count = 0;

    public RecordReadInputStream(FileInputStream delegate) {
        super(delegate);
    }

    @Override
    public int read() throws IOException {
        ++count;
        return super.read();
    }

    public int getCount() {
        return count;
    }

    @Override
    public void close() throws IOException {
        super.close();
    }
}
